package excercise;

public class EX30 {

	
	public static void main(String[] args) {
		System.out.println("                  Multplication Table");
		System.out.println("          1       2       3       4       5       6       7       8       9");
		System.out.println("--------------------------------------------------------------------------");
		/*System.out.println("1 |       1       2       3       4       5       6       7       8       9");
		System.out.println("2 |       2       4       6       8      10      12      14      16      18");
		System.out.println("3 |       3       6       9      12      15      18      21      24      27");
		System.out.println("4 |       4       8      12      16      20      24      28      32      36");
		System.out.println("5 |       5      10      15      20      25      30      35      40      45");
		System.out.println("6 |       6      12      18      24      30      36      42      48      54");
		System.out.println("7 |       7      14      21      28      35      42      49      56      63");
		System.out.println("8 |       8      16      24      32      45      48      56      64      72");
		System.out.println("9 |       9      18      27      36      45      54      63      72      81");
		*/
		/*
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 1 + " |");
			System.out.print("       " +i * 1);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 2 + " |");
			System.out.print("      " +i * 2);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 3 + " |");
			System.out.print("      " +i * 3);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 4 + " |");
			System.out.print("      " +i * 4);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 5 + " |");
			System.out.print("      " +i * 5);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 6 + " |");
			System.out.print("      " +i * 6);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 7 + " |");
			System.out.print("      " +i * 7);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 8 + " |");
			System.out.print("      " +i * 8);
		}
		System.out.println();
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * 9 + " |");
			System.out.print("      " +i * 9);
		}
		System.out.println();\
		*/
		for(int j = 1; j <= 9; ++j){
		for( int i = 1; i <= 9; ++i){
			if ( i == 1) System.out.print(i * j + " |");
			System.out.print("\t" +i * j);
		}
			System.out.println();
	}
		//저장용주석
}
}
